{extend name="base" /}
{block name="body"}
<div class="layui-card">
  <div class="layui-card-body">
    <blockquote class="layui-elem-quote layui-text">
        状态：<span class="text-danger">隐藏</span>，将不在首页展示，管理员回复后，无法再次回复同一留言！
    </blockquote>
    <div class="layui-form-item">
        <form class="layui-form layui-form-pane" action="{:request()->url()}" >
            <div class="layui-input-inline">
                <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="{if $Request.get.title}{$Request.get.title}{else}请输入关键字{/if}" class="layui-input">
            </div>
            <div class="layui-input-inline">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">{$Think.lang.search}</button>
            </div>
        </form>
    </div>
        <table class="layui-table layui-form" lay-skin="line">
            <thead>
                <tr>
                    <th>{$Think.lang.id}</th>
                    <th>{$Think.lang.username}</th>
                    <th>{$Think.lang.name}</th>
                    <th>{$Think.lang.value}</th>
                    <th>{$Think.lang.isshow}</th>
                    <th>{$Think.lang.isreply}</th>
                    <th>{$Think.lang.reply}{$Think.lang.value}</th>
                    <th>{$Think.lang.CreateTime}</th>
                    <th>{$Think.lang.Handle}</th>
                </tr>
            </thead>
            <tbody>
                {volist name="list" id="v" empty="$empty"}
                <tr>
                    <td>{$i}</td>
                    <td>{$v.user_name}</td>
                    <td>{$v.title}</td>
                    <td>{$v.content}</td>
                    <td><input type="checkbox" name="is_show" value="{$v.id}" lay-skin="switch" lay-filter="*" lay-text="显示|隐藏" data-url="{:url('status')}" {if $v.is_show eq 1}checked{/if}></td>
                    <td>{if $v.is_reply}<span class="layui-badge layui-badge-green">已回复</span>{else}<span class="layui-badge layui-badge-red">未回复</span>{/if}</td>
                    <td>{$v.reply_content}</td>
                    <td>{$v.create_time}</td>
                    <td>
                        {if !$v.is_reply}
                        <button class="layui-btn layui-btn-xs open-popup" data-title="{$Think.lang.reply}" data-url="{:url('reply', ['id' => $v.id])}"><i class="fa fa-edit"></i>{$Think.lang.reply}</button>
                        {/if}
                        <button class="layui-btn layui-btn-danger ajax-del layui-btn-xs" data-title="{$Think.lang.drop}" data-url="{:url('del', ['id' => $v.id])}"><i class="fa fa-trash-o"></i>{$Think.lang.drop}</button>
                    </td>
                </tr>
                {/volist}
            </tbody>
        </table>
        <div class="page">{$list|raw}</div>
    </div>
</div>
{/block}
{block name="js"}
{/block}